package cn.wolfcode.edu.mapper;

import cn.wolfcode.edu.domain.Employee;
import cn.wolfcode.edu.query.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee entity);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee entity);

    int queryForCount(EmployeeQueryObject qo);
    List<Employee> queryForList(EmployeeQueryObject qo);
    Employee getByUserName(String username);

    void insertRelationWithRole(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

    void deleteRelationWithRoleByEmployeeId(Long id);
    void deleteToClose(Long id);

    Employee selectByUsername(String username);

    //陈遵汉专有 勿删
    List<Employee> selectEmployeeByHan();

    List<Employee> listAllEmployeeBySn(String sn);

    Employee selectByRealName(String username);

    //陈遵汉专有 勿删
}